home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / amac44b.zip / MACR33.QM < prev    next >
Text File  |  1992-06-22  |  38KB  |  813 lines

  1. *                             MACR33.QM, v3.3b
  2. *                Macros To Make, Convert and Read Macros
  3. *                        Written by Tom Hogshead
  4. *                 With Macro Contributions By Tim Farley
  5. *                                 6/22/92
  6. *
  7. *   @f6     Condense Qmac Macro to Fit On One Line of Qconfig.dat ( )     |new
  8. *   @2      Reads "Standard" Macros
  9. *   @8      Reads Current Txtfile Macros
  10. *   @3      Append Designated Txtfile With Current Macros, Reads Macfile
  11. *   @4      Appends Current Txtfile To Standard Macros, Reads Macfile
  12. *   @5      Gets Error File In Window To Find Another Error
  13. *   @6      Makes Dummy Txtfile From Current Macros
  14. *   @7      Makes & Reads Dummy Macfile From Txtfile, With Error Window
  15. *   @t      Makes & Reads Dummy Macfile From Txtfile, SMALL
  16. *   @9      Makes Macfile of Current Txtfile Macros, No Macfile Read
  17. *   @0      Makes & Reads Macfile of Current Txtfile, With Error Window
  18. *   @q      Makes & Reads Macfile of Current Txtfile Txtfile, SMALL
  19. *   @f1     Makes Single Column Macro
  20. *   @f2     Puts Command Key Beside A Single Command In A Macro
  21. *   @f3     Puts Command Key Beside ALL Commands In A Macro
  22. *   @f4     Gets A Single Command And It's Key On Screen
  23. *   @f5     Test TRUE/FALSE Results, Tim Farley, Author
  24. *   @3      {e:\up\mis006}  Test True/False for WhiteSpace/Non-WhiteSpace
  25. *   @h      Jump to Index Item on Cursor Line
  26. *
  27. *           Index  Use      - How to jump to macro or item from Index using @h
  28. *           Description     - MacroMaker Macros
  29. *           Requirements    - and use
  30. *           Startup         - See MACR.DOC for startup instructions
  31. *           Macros
  32. *           Other  Macros   - not included
  33. *           Version  History
  34. *
  35. *-- eoi
  36.  
  37.  
  38. * 
  39. * (Description)
  40. *---------------
  41. * MACRxx.ZIP contains QEdit macros to easily make and convert macros to
  42. * and from text/binary (txtfile/macfile) using QMAC macro translator.
  43.  
  44. * 
  45. * (Requirements) and Use.  See MACR.DOC for (startup) instructions
  46. *------------------------------------------------------------------
  47. *         1. Txtfile name extension MUST be [file].QM, Macfile [file].MAC.
  48. *         2. Change ram disk c:\ (also in batch files) for your setup.
  49. *            Ram disk is optional but faster than a hard drive. Use any
  50. *            active drive letter to replace c:\.
  51. *         3. Batch files must be in path or current directory.
  52. *         4. Modify "g:\qe\MACROS.xxx" in macros to your "standard" macro.
  53. *            Be careful to use or not use extension as shown, with spaces.
  54. *         5. Be sure to change "g:\qe\qconfig.dat" in the macros @f2 -
  55. *            @f4 below to the location of your qconfig.dat in your
  56. *            setup, and convert with QMAC.
  57. *         6. In order for macros @f2 - @f4 to find a command in
  58. *            Qconfig.dat, there must be at least eight blank spaces
  59. *            betweeen the end of the command key and the beginning of
  60. *            the command.  If your Qconfig.dat has fewer spaces, the
  61. *            macros must be modified in the first 'FIND' line.
  62. *         7. Insert must be ON.
  63. *         8. These macros require "QEdit and QMAC v2.1, February, 1990"
  64. *            or later.  @0 and @f3 require v2.15.
  65. *         9. Insert must be On.
  66.  
  67. * To BEGIN, just type "START MACR" <Enter>.  All pertinent files will
  68. * be loaded in the "Ring" for viewing, and MACR33.MAC is read.
  69.  
  70. * 
  71. * (Index) Use
  72. *-------------
  73. * To locate a macro or item in this file, press @h, place the cursor
  74. * line on the desired item in the Index above, and press <enter>.
  75. * See BOOKxx.QM for more details.
  76.  
  77. *                            M A C R O S
  78. * ----------------------------------------------------------------------
  79. * @(2)  - Reads "Standard" (Macros)
  80. * ----------------------------------------------------------------------
  81. * Remember you MUST modify "g:\qe\macros.mac" with your "standard" macfile.
  82.  
  83. @2 MacroBegin MacroRead "g:\qe\macros.mac" Return
  84. *
  85. * 38 bytes Fri  09-14-1990  14:05:43
  86. * 38 bytes Mon  10-14-1991  10:57:25 (TH @2)
  87.  
  88. * 
  89. * ----------------------------------------------------------------------
  90. * @(3) - Append Designated Txtfile With Current Macros, Reads Macfile
  91. * ----------------------------------------------------------------------
  92.  
  93. @3 macrobegin onewindow dropanchor
  94.    editfile "NUL" return quit gotoblockbeg editfile return
  95.    "Merge macro ?" cursorright          * query for macro name, no extension
  96.    markcharacter pause copy
  97.    macrowrite "dum4.mac" return return
  98.    quit
  99.    DOS "qmacM " paste return return     * append designated to current macros
  100.    editfile "c:!" return quit horizontalwindow editfile return
  101.    insertdate  inserttime
  102.    find "(" return delline return       * find first error
  103.  jfalse NOERROR  wordright markword copy
  104.    savefile prevwindow
  105.    gotoline paste return                * move to line with first error
  106.    makectrofscreen pause
  107.  jump CONTINUE
  108.  NOERROR:
  109.    prevwindow
  110.  CONTINUE:
  111.    onewindow
  112.    editfile "dum4.qm" return            * load txtfile with appended macro
  113.    splitline newfile "N" return         * re-load in case previous copy loaded
  114.    endfile addline "*...Tom Hogshead "  *  (change to your name)
  115.   insertdate inserttime "Appended "
  116.   paste                                 * paste file name we are appending
  117.   endline ".qm to current macros"
  118.   unmarkblock savefile                  * save new txtfile with appended macro
  119.   macroread "dum4.mac" return           * read current + appended macros
  120. *
  121. * 262 bytes Wed  05-01-1991  12:26:00
  122. * 263 bytes Fri  10-18-1991  13:57:46 (TH @3)
  123.  
  124. *   ┌───────────────────────── QMACM.BAT ──────────────────────────────┐
  125. *   │ rem qmacM.bat                   Sun  09-30-1990                  │
  126. *   │ rem * Converts current macros to dum4.qm text...                 │
  127. *   │         QMAC      dum4.mac dum4.qm /T /A-  >c:!                  │
  128. *   │ rem * Appends macros to be merged to dum4.qm....                 │
  129. *   │         QMAC        %1.mac dum4.qm /T /A+ >>c:!                  │
  130. *   │ rem * Converts appended macro to binary.........                 │
  131. *   │         QMAC      dum4.mac dum4.qm /B /A- >>c:!                  │
  132. *   └──────────────────────────────────────────────────────────────────┘
  133.  
  134. * 
  135. * ----------------------------------------------------------------------
  136. * @(4) - Appends Current Txtfile To Standard Macros, Reads Macfile
  137. * ----------------------------------------------------------------------
  138. *  Remember you MUST modify "g:\qe\macros" (no extension) in this
  139. *  macro to your "standard" macfile.
  140.  
  141. * Be careful that the macro size of the txtfile you are appending plus
  142. * the size of your standard macros do not exceed 2k, the macro buffer
  143. * limitation. If this occurs, you will get an error message, and the
  144. * macros will not be appended.
  145.  
  146. @4 macrobegin
  147.    unmarkblock savefile onewindow
  148.    DOS "qmacTA2 " currentfilename backspace backspace backspace " "
  149.   "g:\qe\macros"                    *<<<<<CHANGE Standard macros name, no ext.
  150.    return
  151.    begline insertline dropanchor currentfilename
  152.    storescrbuff "1" return cut
  153.    editfile "c:!" return quit
  154.    editfile paste return                * return to current txtfile
  155.    horizontalwindow
  156.    editfile "c:!" return                * get error file in window 2
  157.    find "(" return delline return       * find first error
  158.  jfalse NOERROR  wordright markword copy
  159.    savefile prevwindow
  160.    gotoline paste return                * move to line with first error
  161.    makectrofscreen pause
  162.  jump CONTINUE
  163.  NOERROR: prevwindow
  164.  CONTINUE: onewindow                    *                                 |
  165.    editfile "c:$" return killfile quit
  166.    editfile "dum3.qm" return quit editfile return         * load dum3.qm
  167.    endfile addline begline
  168.   "*" cursorright "Tom Hogshead"
  169.    cursorright cursorright insertdate inserttime
  170.   "Appnd:" cursorright
  171.    getscrbuff "1" return unmarkblock    * Insert file at eof
  172.    savefile
  173.    macroread currentfilename backspace backspace "MAC" return  * read dum3.mac
  174. *
  175. * 229 bytes Wed  05-01-1991  12:45:43
  176. * 229 bytes Sun  10-13-1991  13:48:43 (TH @4, changed e:\ to f:\)
  177. * 202 bytes Fri  10-18-1991  14:45:55 (TH @4, shortened)
  178. * 202 bytes Fri  10-18-1991  14:48:56 (TH @4)
  179.  
  180. *   ┌───────────────────────── QMACTA2.BAT ────────────────────────────────┐
  181. *   │ @echo off                                                            │
  182. *   │ echo qmacTA2.BAT                Sun  09-30-1990                      │
  183. *   │     echo Appending %1.MAC  TO  %2.QM                                 │
  184. *   │     echo .                                                           │
  185. *   │     if exist c:dum*.qm erase c:dum*.qm                               │
  186. *   │     rem c:\ is ram disk, change to any active directory              │
  187. *   │ :1                                                                   │
  188. *   │     echo FIRST, Converting %1.QM  TO  %1.MAC                         │
  189. *   │     if not exist %1.QM goto NOTEXIST                                 │
  190. *   │     QMAC   %1.MAC      %1.QM   /B /A-       %3  >c:!                 │
  191. *   │     echo Copying  %2.QM  TO  c:dum1.QM  & c:dum2.QM                  │
  192. *   │     copy %2.qm c:dum1.qm                                             │
  193. *   │     copy %2.qm c:dum2.qm                                             │
  194. *   │ :2                                                                   │
  195. *   │     echo SECOND, Appending %1.MAC  TO  c:dum2.QM                     │
  196. *   │     QMAC   %1.MAC   c:dum2.QM /T /A+ /W70   %3 >>c:!                 │
  197. *   │     echo Copying  c:dum2.QM  TO  dum3.QM (Appended txtfile)          │
  198. *   │     copy c:dum2.qm  dum3.qm                                          │
  199. *   │ :3                                                                   │
  200. *   │     echo THIRD, Converting dum3.QM  TO  dum3.MAC (Appended macfile)  │
  201. *   │     QMAC   dum3.MAC    dum3.QM /B /A-       %3 >>c:!                 │
  202. *   │           dir %1.qm       >c:$                                       │
  203. *   │           dir %2.qm      >>c:$                                       │
  204. *   │           dir c:dum?.qm  >>c:$                                       │
  205. *   │           dir dum?.qm    >>c:$                                       │
  206. *   │           dir %1.mac     >>c:$                                       │
  207. *   │           dir %2.mac     >>c:$                                       │
  208. *   │           dir dum?.mac   >>c:$                                       │
  209. *   │     goto END                                                         │
  210. *   │ :NOTEXIST                                                            │
  211. *   │         echo %1.QM does not exist                                   │
  212. *   │ :END                                                                 │
  213. *   └──────────────────────────────────────────────────────────────────────┘
  214.  
  215. * 
  216. * ----------------------------------------------------------------------
  217. * @(5) Gets Error File (C:!) In Window To Find Another Error
  218. * ----------------------------------------------------------------------
  219. * At the pause, cursor down to error line and press <enter>, or if no
  220. * errors, press <enter> to return to cursor position when macro was
  221. * invoked.
  222.  
  223. @5  macrobegin
  224.         defaultwordset                                                     *|
  225.         onewindow horizontalwindow
  226.         editfile "c:!" return begfile
  227.         pause markline find "(" return "L" return
  228.     jfalse NOERROR  wordright markword copy
  229.         quit prevwindow gotoline paste return
  230.     jump CONTINUE
  231.     NOERROR:  quit prevwindow
  232.     CONTINUE: onewindow
  233. *
  234. * 17 bytes Fri  09-14-1990  14:05:55
  235. * 41 bytes Fri  10-18-1991  13:58:27 (TH @5)
  236. * 42 bytes Mon  01-27-1992  13:58:11 (TH @5, added defaultwordset)
  237. * 42 bytes Sun  05-17-1992  11:26:24 (TH @5, for all Qconfig's)
  238.  
  239. * 
  240. * ----------------------------------------------------------------------
  241. * @(6) - Makes Dummy Txtfile From Current Macros
  242. * ----------------------------------------------------------------------
  243.  
  244. @6 macrobegin
  245.        insertline begline macrowrite "c:$.mac" return "Y" delline
  246.        DOS "qmact c:$" return return                            * make c:$.qm
  247.        editfile backspace backspace backspace "qm" return quit  * quit c:$.qm
  248.        editfile return killfile endfile                         * load c:$.qm
  249. *
  250. * 61 bytes Sat   09-15-1990  14:26:40
  251. * 60 bytes Thu  10-17-1991  13:14:43 (TH @6, safer)
  252.  
  253. *   ┌───────────────────────── QMACT.BAT ──────────────────────────────┐
  254. *   │ @echo off                                                        │
  255. *   │ : qmacT.bat             December 21, 1991                        │
  256. *   │         cls                                                      │
  257. *   │         echo Converts %1.MAC (binary) To %1.QM (text)            │
  258. *   │         if not exist %1.MAC goto NOTEXIST                        │
  259. *   │         QMAC   %1.MAC      %1.QM   /T /A- /I05 /W75 %2 %3        │
  260. *   │         goto END                                                 │
  261. *   │ :NOTEXIST                                                        │
  262. *   │         echo %1.MAC does not exist                              │
  263. *   │ :END                                                             │
  264. *   └──────────────────────────────────────────────────────────────────┘
  265.  
  266. * 
  267. * ----------------------------------------------------------------------
  268. * @(7) - Makes & Reads Dummy Macfile From Txtfile, With Error Window
  269. * ----------------------------------------------------------------------
  270.  
  271. @7 macrobegin
  272.    onewindow defaultwordset                                                *|
  273.    endline cursorright writeblock "c:$.qm" return "O" backspace begline
  274.    begline insertline unmarkblock dropanchor currentfilename
  275.    storescrbuff "1" return cut
  276.    editfile return quit editfile return
  277.    DOS "qmacbj c:$" return return               * make c:$.mac
  278.    begline insertline dropanchor currentfilename cut
  279.    editfile "c:!" return quit editfile paste return
  280.    horizontalwindow
  281.    editfile "c:!" return                        * load error file in window 2
  282.    insertdate inserttime
  283.    find "(" return delline return               * find first error
  284.  jfalse NOERROR  wordright markword copy
  285.    savefile prevwindow gotoline paste return makectrofscreen
  286.    pause
  287.  jump CONTINUE
  288.  NOERROR: prevwindow
  289.  CONTINUE: onewindow
  290.    DOS "qmact c:$" return return                * make c:$.qm
  291.    editfile "c:$.qm" return quit editfile return    * load c:$.qm
  292.    endfile addline "*" cursorright insertdate inserttime
  293.    getscrbuff "1" return unmarkblock            * Insert file name at eof
  294.    killfile                                     * kill c:$.qm
  295.    macroread currentfilename backspace backspace "MAC" return
  296. *
  297. * 185 bytes Wed  05-01-1991  13:19:11
  298. * 173 bytes Thu  05-16-1991  11:52:26 (TH removed unnecessary c:$.qm)
  299. * 177 bytes Fri  10-18-1991  13:58:42 (TH @7)
  300. * 178 bytes Mon  01-27-1992  13:56:02 (TH @7, added defaultwordset)
  301.  
  302. *   ┌───────────────────────── QMACBJ.BAT ─────────────────────────────┐
  303. *   │ @echo off                                                        │
  304. *   │ rem qmacBJ.bat                  Sun  09-30-1990                  │
  305. *   │         cls                                                      │
  306. *   │         echo Converts %1.QM (text) To %1.MAC (binary)            │
  307. *   │         echo Any errors will be in file c:!                      │
  308. *   │         if not exist %1.QM goto NOTEXIST                         │
  309. *   │         QMAC   %1.MAC      %1.QM   /B /A-       %2 %3  >c:!      │
  310. *   │         goto END                                                 │
  311. *   │ :NOTEXIST                                                        │
  312. *   │         echo %1.QM does not exist                               │
  313. *   │ :END                                                             │
  314. *   └──────────────────────────────────────────────────────────────────┘
  315.  
  316. * 
  317. * ----------------------------------------------------------------------
  318. * @(8) - Reads Macfile of Current Txtfile
  319. * ----------------------------------------------------------------------
  320.  
  321. @8 macrobegin macroread currentfilename backspace backspace "mac" return
  322. *
  323. * 15 bytes Fri  09-14-1990  14:06:11
  324.  
  325. * 
  326. * ----------------------------------------------------------------------
  327. *  @(9) - Makes Macfile of Current Txtfile, No Macfile Read
  328. * ----------------------------------------------------------------------
  329.  
  330. @9  macrobegin savefile
  331.     DOS "qmacb " currentfilename backspace backspace backspace return
  332. *
  333. * 23 bytes Fri  09-14-1990  14:06:14
  334.  
  335. *   ┌───────────────────────── QMACB.BAT ──────────────────────────────┐
  336. *   │ @echo off                                                        │
  337. *   │ rem qmacB.bat                   Sun  09-30-1990                  │
  338. *   │         cls                                                      │
  339. *   │         echo Converts %1.QM (text) To %1.MAC (binary)            │
  340. *   │         if not exist %1.QM goto NOTEXIST                         │
  341. *   │         QMAC   %1.MAC      %1.QM   /B /A-       %2 %3            │
  342. *   │         goto END                                                 │
  343. *   │ :NOTEXIST                                                        │
  344. *   │         echo %1.QM does not exist                               │
  345. *   │ :END                                                             │
  346. *   └──────────────────────────────────────────────────────────────────┘
  347.  
  348. * 
  349. * ----------------------------------------------------------------------
  350. * @(0) - Makes & Reads Macfile of Current Txtfile, With Error Window
  351. * ----------------------------------------------------------------------
  352. * This macro requires QEdit v2.15, and will fit on one line of Qconfig.dat.
  353.  
  354. @0 macrobegin
  355.         defaultwordset setscreenoff savefile onewindow unmarkblock dropanchor
  356.         DOS "qmacbj " currentfilename
  357.         backspace backspace backspace return return
  358.         editfile "c:!" return quit gotoblockbeg unmarkblock
  359.         horizontalwindow editfile return
  360.         find "(" return delline return               * Find first error
  361.     jfalse NOERROR  wordright markword copy
  362.         prevwindow gotoline paste return             * Pos cursor on error
  363.         setscreenon pause setscreenoff
  364.     jump CONTINUE
  365.     NOERROR: quit prevwindow
  366.     CONTINUE:
  367.         onewindow macroread currentfilename backspace backspace "mac" return
  368. *
  369. * 94 bytes Wed  05-01-1991  13:38:07
  370. * 80 bytes Thu  10-17-1991  13:41:58 (TH @0, shortened, QEdit v2.15 reqd.)
  371. * 81 bytes Mon  01-27-1992  13:58:57 (TH @0, added defaultwordset)
  372.  
  373. * 
  374. * ----------------------------------------------------------------------
  375. * @(t) Copies txtfile [file].QM to dummy txtfile,
  376. *      Makes and reads macfile, small version
  377. * ----------------------------------------------------------------------
  378. * This is an alternate version of @7. Errors during macro conversion are
  379. * not saved in an error window. It is much smaller than @7.
  380.  
  381. @t      MacroBegin
  382.         unmarkblock endline cursorright                             *|
  383.         writeblock "c:$.qm" return "O" backspace begline            *|
  384.         DOS "qmacB c:$" Return Return           * make temp macfile
  385.         DOS "qmacT c:$" Return Return           * make temp txtfile
  386.         EditFile  "c:$.qm" Return Killfile      * Kill temp file
  387.         MacroRead "c:$.Mac" Return              * read temp macfile
  388. *
  389. * 95 bytes Fri  09-14-1990  14:06:07
  390. * 98 bytes Mon  10-14-1991  15:53:22 (TH @t)
  391.  
  392. * 
  393. * ----------------------------------------------------------------------
  394. * @(q) Makes macfile from txtfile [file].QM
  395. *      Loads macfile [file].MAC, NO error window, SMALL
  396. * ----------------------------------------------------------------------
  397.  
  398. @q macrobegin
  399.    savefile
  400.    DOS "qmacb " currentfilename backspace backspace backspace return return
  401.    macroread currentfilename backspace backspace "mac" return
  402. *
  403. * 35 bytes Fri  09-14-1990  14:06:22
  404.  
  405. * 
  406. * ----------------------------------------------------------------------
  407. * @(h) Finds first word on cursor line marked in document below
  408. * ----------------------------------------------------------------------
  409.  
  410. * See BOOKxx.QM for use of @h.
  411.  
  412. @h      MacroBegin UnmarkBlock DefaultWordSet BegFile EndPara
  413.         MarkLine BegFile Find "(" Return "L" Return JFalse Label0
  414.         MakeCtrOfScreen BegFile UnmarkBlock MarkLine MarkLine
  415.         PrevPosition BegLine Pause WordRight MarkWord Copy EndPara
  416.         Find "(" Paste ")" Return "I" Return JFalse Label1  BegLine
  417.         MakeTopOfScreen ScrollUp Jump Label2  Label0: Label1: BegFile
  418.         Label2:
  419. *
  420. * 52 bytes Wed  07-31-1991  14:43:31 (TH @h, @4 in MACRxx.QM)
  421.  
  422. * 
  423. * ----------------------------------------------------------------------
  424. * @(F1) Makes Single Column Macro
  425. * ----------------------------------------------------------------------
  426. * To  make a single column macro with Alt_f1, place the cursor line
  427. * anywhere in a macro txtfile (after loading the macfile) and press Alt
  428. * and f1 at the same time. If a macro is not a marked block, the full
  429. * txtfile is made into a single column macros.
  430.  
  431. @f1 macrobegin
  432.         endline cursorright writeblock "c:$.qm" return "O" backspace begline
  433.         DOS "qmacB c:$"   return return                     * Make macfile
  434.         DOS "qmacT-n c:$" return return                     * Make txtfile
  435.         editfile "c:$.qm" return quit editfile return
  436.         endfile addline "*" cursorright
  437.         insertdate inserttime killfile                      * Date stamp
  438. *
  439. * 98 bytes Fri  09-14-1990  14:06:30
  440. * 103 bytes Fri  10-18-1991  14:56:58 (TH @f1 in MACRxx.QM)
  441. * 95 bytes Thu  11-14-1991  22:42:20 (TH @f1, removed currentfilename)
  442.  
  443. *   ┌───────────────────────── QMACB.BAT ──────────────────────────────┐
  444. *   │ @echo off                                                        │
  445. *   │ rem qmacB.bat                   Sun  09-30-1990                  │
  446. *   │         cls                                                      │
  447. *   │         echo Converts %1.QM (text) To %1.MAC (binary)            │
  448. *   │         if not exist %1.QM goto NOTEXIST                         │
  449. *   │         QMAC   %1.MAC      %1.QM   /B /A-       %2 %3            │
  450. *   │         goto END                                                 │
  451. *   │ :NOTEXIST                                                        │
  452. *   │         echo %1.QM does not exist                               │
  453. *   │ :END                                                             │
  454. *   └──────────────────────────────────────────────────────────────────┘
  455. *   ┌────────────────────────── QMACT-N.BAT ───────────────────────────┐
  456. *   │ @echo off                                                        │
  457. *   │ rem qmacT-n.bat for single column txtfile       Sun  09-30-1990  │
  458. *   │         cls                                                      │
  459. *   │         echo Converts %1.MAC (binary) To %1.QM (text)            │
  460. *   │         if not exist %1.MAC goto NOTEXIST                        │
  461. *   │         QMAC   %1.MAC      %1.QM   /T /A- /W15  %2 %3            │
  462. *   │         goto END                                                 │
  463. *   │ :NOTEXIST                                                        │
  464. *   │         echo %1.QM does not exist                               │
  465. *   │ :END                                                             │
  466. *   └──────────────────────────────────────────────────────────────────┘
  467.  
  468. * 
  469. * ----------------------------------------------------------------------
  470. * @(F2) Puts Key Beside Single Command
  471. * ----------------------------------------------------------------------
  472. * To get the key for a single command in a macro, place the cursor line
  473. * on the command in a single column macro txtfile and press Alt_f2. The
  474. * key corresponding to the command will be listed next to the commmand.
  475. * Commands must be a single command column macro made with @f1.
  476.  
  477. @f2 macrobegin
  478.         unmarkblock insertline begline
  479.         dropanchor currentfilename storescrbuff "1" return cut
  480.         begline wordright markword copy
  481.         editfile "g:\qe\qconfig.dat" return     * *<<<<<CHANGE
  482.         begfile
  483.         FIND "         "                * insert 8 spaces before find
  484.         paste                           * paste command for find
  485.         return "IW" return              * find command in qconfig.dat
  486.  jfalse NOFIND
  487.         wordright markcolumn            * move cursor to command
  488.         begline "* " begline markcolumn
  489.         storescrbuff "2" return         * get key to scrbuff
  490.         cursordown unmarkblock
  491.         getscrbuff "1" return cut       * cut currentfilename
  492.         editfile paste return
  493.         markcolumn gotocolumn "33" return     * postition to get key
  494.         getscrbuff "2" return           * get key
  495.         makectrofscreen
  496.         begline cursordown
  497.  jump END                               * End after getting key
  498.  NOFIND:                                * come here if no key for command
  499.         getscrbuff "1" return cut       * cut currentfilename
  500.         editfile paste return
  501.         gotocolumn "33" return "* "
  502.         cursordown begline
  503.  END:
  504. *
  505. * 145 bytes Mon  02-18-1991  12:32:15
  506. * 145 bytes Sun  10-13-1991  13:49:41 (TH @f2, changed e:\ to f:\)
  507. * 144 bytes Fri  10-18-1991  15:06:12 (TH @f2, shortened)
  508.  
  509. * 
  510. * ----------------------------------------------------------------------
  511. * @(F3) Puts Key Beside All Commands In Single Column Macfile
  512. * ----------------------------------------------------------------------
  513. * To get the keys for ALL commands in a macro, place the cursor
  514. * line at the top of a macro txtfile and press Alt_f3. An example of
  515. * this output is shown at the end of this macro. The keys corresponding
  516. * to each command will be listed also in a single column next to the
  517. * command.  This macro requires QEdit v2.15.
  518.  
  519. @f3 macrobegin
  520.         setscreenoff
  521.         unmarkblock insertline begline dropanchor currentfilename
  522.         storescrbuff "1" return
  523.         cut                             * delete temp line
  524.  START:
  525.         endline begline                 * line blank? if so end
  526.  jfalse END
  527.         begline wordright markword
  528.         copy unmarkblock                * get command to scrap, unmark
  529.         editfile "g:\qe\qconfig.dat" return     *<<<<<CHANGE
  530.         begfile
  531.         FIND "         "                * insert 8 spaces before find
  532.         paste                           * paste command for find
  533.         return "IW" return              * find command in qconfig.dat
  534.  jfalse NOFIND
  535.         wordright markcolumn begline    * move cursor to command
  536.        "* " begline markcolumn
  537.         storescrbuff "2" return         * get key to scratch
  538.         cursordown unmarkblock          * move down line, unmark command
  539.         quit                            * quit qconfig.dat
  540.         getscrbuff "1" return cut       * cut currentfilename
  541.         editfile paste return
  542.         markcolumn
  543.         gotocolumn "33" return          * postition to get key
  544.         setscreenon
  545.         getscrbuff "2" return           * get key
  546.         unmarkblock setscreenoff
  547.         begline cursordown              * move down to next command
  548.         makectrofscreen
  549.  jump START
  550.  NOFIND:
  551.         getscrbuff "1" return cut
  552.         editfile paste return
  553.         gotocolumn "33" return "* "     * position to get key
  554.         setscreenon setscreenoff
  555.         begline cursordown              * move down to next command
  556.  jump START
  557.  END:
  558. *
  559. * 154 bytes Mon  02-18-1991  12:32:44
  560. * 154 bytes Sun  10-13-1991  13:50:44 (TH @f3, change e:\ to f:\)
  561. * 160 bytes Thu  10-17-1991  13:30:02 (TH @f3, QEdit v2.15)
  562.  
  563. * 
  564. * ----------------------------------------------------------------------
  565. * @(F4) Retrieves A Command And It'S Key From QCONFIG.DAT
  566. * ----------------------------------------------------------------------
  567. * This macro retrieves a command or all commands matching a selected
  568. * find criteria from your QCONFIG.DAT file, displays the selected
  569. * command(s) and it's key on the screen, and then removes the
  570. * command(s) and it's key from the screen. For those of us who can
  571. * never remember all the commands and can never find our reference
  572. * sheet, this might help.
  573.  
  574. * To run, press Alt_f4, then enter the first letter (or more) of the
  575. * command you want to know the key for, press 'Enter' to see the the
  576. * command(s) and it's key, then press 'Enter' again to remove the
  577. * command(s) and it's key from the screen.
  578.  
  579. * For example, to find the key for appendscrbuff, press:
  580. *                     <Alt_f4>
  581. *                      app
  582. *                     <Enter>
  583.  
  584. * You should see the following highlighted on your screeen:
  585.  
  586. * ^b_a            appendscrbuff
  587.  
  588. * Entering "b" instead shows all commands beginning with "b":
  589.  
  590. * ^h              backspace
  591. * ^home           begscreen
  592. * ^pgup           begfile
  593. * home            begline
  594. * backspace           backspace    *(note, at least 8 spaces required)
  595.  
  596. * Press 'Enter' to remove the command(s) and it's key from the screen,
  597. * or press 'Esc' three times if you want to keep the command(s) on the
  598. * screen for reference.
  599.  
  600. *  Requires QEdit v2.15.
  601.  
  602. @f4     macrobegin setscreenoff setinsmode                                 *|
  603.         unmarkblock insertline begline dropanchor currentfilename cut
  604.         editfile
  605.        "g:\qe\qconfig.dat" return           *<<<<<CHANGE to you d:\path\
  606.         endline dropanchor                  * Mark to clear scratch
  607.         storescrbuff "1" return             * Get to scratch
  608.         unmarkblock begfile                 * Go to begin qconfig.dat
  609.         setscreenon                                                        *|
  610.         FIND "         "                    * Insert 8 spaces before find
  611.         pause                               * Pause for command to find
  612.         return "i" return                   * Find first command
  613.         Jfalse FAIL                         * Stop macro if search fails
  614.   jump NEXT
  615.   START:
  616.         setscreenoff                                                       *|
  617.         repeatfind                                                         *|
  618.   jfalse FINISH                             * Mark if found, quit if not
  619.   NEXT:
  620.         setscreenoff                                                       *|
  621.         markline begline                    * Mark command line
  622.        "* "
  623.         appendscrbuff "1" return            * Append to scratch
  624.         cursordown unmarkblock              * Move down, unmark command
  625.   jump START
  626.   FINISH:
  627.         quit                                * Quit qconfig.dat
  628.         editfile paste return
  629.         markcolumn
  630.         getscrbuff "1" return               * Get command and key
  631.         delline begline
  632.         maketopofscreen
  633.         setscreenon                                                        *|
  634.         pause                               * Pause, then 'Enter' to..
  635.         setscreenoff                                                       *|
  636.         deleteblock                         * Clean up, remove block
  637.         Jump END
  638.  FAIL:
  639.         quit                                * Quit qconfig.dat
  640.         editfile paste return               * Return to file we were
  641.  END:                                       *  editing if search fails
  642. *
  643. * 128 bytes Fri  03-29-1991  16:43:58
  644. * 128 bytes Sun  10-13-1991  13:52:07 (TH @f4, changed e:\ to f:\)
  645. * 128 bytes Mon  01-27-1992  14:30:21 (TH @f4, changed f:\ to g:\)
  646. * 131 bytes Mon  04-20-1992  12:26:34 (TH @f4, QEdit v2.15 required)
  647.  
  648.  
  649.  
  650. * 
  651. * ----------------------------------------------------------------------
  652. * @(F5) Test TRUE/FALSE Results, Tim Farley, author
  653. * ----------------------------------------------------------------------
  654. * Date: 07-30-90 (17:34)              Number: 936 / 937
  655. *   To: KARL BRENDEL                  Refer#: 929
  656. * From: TIM FARLEY                      Read: NO
  657. * Subj: Testing TRUE/FALSE result     Status: PUBLIC MESSAGE
  658. * Conf: REGDOS (1)                 Read Type: GENERAL (A)
  659. *
  660. * KB>I'd suggest that when you need to know what a command returns,
  661. * KB>and it appears not to return what you expect, that you write a
  662. * KB>test macro which prints TRUE or FALSE according to the return,
  663. * KB>and experiment with it.
  664. *
  665. * Surprising as it may seem (since I obviously have inside
  666. * knowledge of the editor), I do just this myself!  It's quicker
  667. * for one thing....
  668. *
  669. * Here is the macro I use:
  670. *
  671. * (TH changed key from ^F10 to @F5)
  672.  
  673. @F5  MacroBegin
  674.      JTrue true
  675.      Find ".F." Pause Escape
  676.      Jump end
  677.    true:
  678.      Find ".T." Pause Escape
  679.    end:
  680. *
  681. * 28 bytes Mon  07-30-1990  19:58:27 (TH added)
  682.  
  683. * Just re-wrap this to fit on one line, then put it in your
  684. * QCONFIG.DAT.
  685. *
  686. * Then, when you want to test a command, RECORD a macro that starts
  687. * with the command you wish to test, then this macro.  For
  688. * instance, if I wanted to test BegLine <Home>, I would do this:
  689.  
  690. *
  691. *      (1) Press MacroRecord <Ctrl M>
  692. *      (2) Press the key to record.  (I use <Alt 1> usually).
  693. *      (3) Press the key to test, BegLine <Home>.
  694. *      (4) Press the above macro, <Alt F5>
  695. *      (5) End macro recording <Ctrl M>.
  696. *
  697. * Now I can just move my cursor around, and hit <Alt 1>, to test
  698. * the true/false result of BegLine at different positions.  The
  699. * true or false comes up in a nice little box on the screen, and
  700. * when I press Return the box sends itself away, and does not
  701. * damage the file I am editing or anything.
  702. *
  703. * Note if you run the above <Alt F5> macro by itself, it always
  704. * returns TRUE.  QEdit does not remember the True/False state of
  705. * the last command while "idle".  Thus the necessity of recording
  706. * the above within a macro.
  707. *
  708. * --Tim Farley
  709. *   SemWare Technical Support
  710.  
  711. * (Other) Macros available: See ALLMACRO.INF.
  712. * See RFRMxx.QM for other commenting and un-commenting macros.
  713.  
  714. * 
  715. * ----------------------------------------------------------------------
  716. * @(f6) Condense Qmac Textfile Macro to Fit On One Line of Qconfig.dat
  717. * ----------------------------------------------------------------------
  718. * This macro is useful for condensing a Qmac textfile macro to 'help'
  719. * it fit on   one line of Qconfig.dat:
  720.  
  721.         * 'Label' replaced with 'L'
  722.         * Colon removed after jtrue, jfalse and jump lables
  723.         * "" removed
  724.         * " " replaced with #32 (for re-formatting)
  725.         * #173 characters replaced with '#173'
  726.         * #174 characters replaced with '#174'
  727.  
  728. * A line, column or character block may be marked before invoking,
  729. * either open or closed, and all lines in block will be processed
  730. * without pausing.
  731.  
  732. * CAUTION:    Do not invoke @f6 on Qmac textfile of this file because  
  733. *             the eob marker #173 #174 is in the compiled macro @f6 at
  734. *             the end of this file.  Be sure to edit the output of this
  735. *             macro in case there are some cases I have not
  736. *             anticipated.  
  737.  
  738. @f6 macrobegin
  739.         gotoblockend jtrue OK markline
  740.         gotoblockend jtrue OK
  741.         pause
  742.     OK:
  743.         setscreenoff
  744.         addline begline #173 #174
  745.         markline
  746.         gotoblockbeg begline lower
  747.         findreplace '""'    return delline  return 'ln' return
  748.         findreplace "label" return "L"      return "ln" return
  749.         findreplace '" "'   return '#32'    return "ln" return
  750.         findreplace '"«"'   return '#174'   return "ln" return
  751.     AGAIN:
  752.         wordright isendline jfalse 1
  753.         wordright
  754.     1:
  755.         find ':' return delline return
  756.         jfalse END
  757.         find #173 #174 return delline return
  758.         jfalse END
  759.         prevposition
  760.         wordleft
  761.         wordleft
  762.         isendline jfalse 2
  763.         wordleft
  764.     2:
  765.         markword
  766.         cursorright
  767.         find 'j' return 'LB' return
  768.         jtrue DELCOLON
  769.             find 'L' return 'ILB' return
  770.             jfalse 2a
  771.             wordright
  772. *           wordright
  773.             2a:
  774.         wordright
  775.         wordright                                                        *:21
  776.         jump AGAIN
  777.     DELCOLON:
  778.         find ':' return delline return
  779.         delch
  780.         jump AGAIN
  781.     END:
  782.         find #173 #174 return 'G' return
  783.         delline
  784.         makebotofscreen unmarkblock
  785. *
  786. * 190 bytes Mon  06-22-1992  16:27:05 (TH @f6)
  787.  
  788. * Sample output of @f6  
  789. * --------------------  
  790. * @1  macrobegin cursorright gotoblockbeg jtrue l0 markline  
  791. *   gotoblockbeg jtrue l1 pause jump l2 l0: gotoblockend
  792. *   unmarkblock markline prevposition l2: markline gotoblockbeg
  793. *   l1: begline cursorright find "*" return "lb" return jfalse l3
  794. *   shiftleft shiftleft jump l4 l3: shiftright shiftright begline
  795. *   gotoblockend markcolumn prevposition begline markcolumn fillblock #32
  796. *   return findreplace #32 return "*" return "ln" return l4:
  797.  
  798.  
  799. * 
  800. * (Version) History
  801. * ------------------
  802. * 3.2  -  Modified @3/4/5/6/7/0/t/f1/f2/f3/f4.                        10/14/91
  803. * 3.3  -  Modified @0/5/7 and @f1.                                     1/27/92
  804. * 3.3a -  Modified @5 for all Qconfig's.                               5/13/92
  805. *         Modified @f4 for QEdit v2.15.                                5/17/92
  806. *      -  In Amac43.zip.                                               5/27/92
  807. * 3.3b -  Added ( ) to Index line 1 for bok001.qm macros.              5/30/92
  808. *      -  Added @f6.                                                   6/21/92
  809. *
  810. *
  811. *
  812. *--eof
  813.